﻿using DMSkin.Core;
using Dt261.ViewModel;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Dt261.Views
{
    /// <summary>
    /// RegisterWindow.xaml 的交互逻辑
    /// </summary>
    public partial class RegisterWindow : Window
    {
        public RegisterWindow()
        {
            InitializeComponent();

            this.DataContext = new RegisterWindowViewModel();

            Broadcast.RegisterBroadcast<string>("LoginOK", (obj) =>
            {
                this.Close();
            });

            LogManager.GetCurrentClassLogger().Info("日志-start RegisterWindow"); // 何时输出日志
        }


        public void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();

            //DMSkin.Core.Broadcast.PushBroadcast("LoginOK", "");
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Hyperlink_Click(object sender, RoutedEventArgs e)
        {

        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Uri resourceUri = new Uri(Http.HOST + "tlyht/user/messages/returnCode");


            TuPianYanZheng.Source = new BitmapImage(resourceUri);

        }
    }

}
